package org.example.springmybatis.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.springmybatis.model.UserInfo;

import java.util.List;

//交给Spring管理
@Mapper
public interface UserInfoMapper {
    @Select("select * from user_info")
    List <UserInfo> selectAll();

    @Select("select * from user_info where id=2")
    UserInfo selectAllById();

    @Select("select * from user_info where id=#{id}")
    UserInfo selectById(Integer id);
}
